Conversation
|
Hi @anantma, thanks for your interests! I would prefer the filtering of 0 size data happen during 1) application time (before you use the package, remove unusable sequences first); Or 2) do it during the set_data stage (remove all df that have df.shape[0] == 0). Let me know what you think. |
|
Hi @Mogeng , thank you for the response. I encountered training errors when any sequence in the data has length == 1. Specifically, during transition model estimation (no transitions with single event sequences). Here is a minimal reproducible example - The relevant error trace - I believe it would make sense to keep these single length sequences as they would contribute to initial/emission model estimation, i.e. they should be treated as valid samples - hence the PR. |
Gracefully handled single event sequences during training.
The library's linear models are patched to handle empty data arrays from single-event sequences, preventing errors during the transition calculation step. This aligns the implementation with HMM theory, which permits sequences of any length, including single-event sequences that have no transitions.
This change is